import 'package:flutter/material.dart';

// ignore: must_be_immutable
class ShadowWidget extends StatefulWidget {
  Widget originWidget;
  EdgeInsets margin;
  EdgeInsets padding;
  ShadowWidget(
      {required this.originWidget,
      this.margin = const EdgeInsets.all(0),
      this.padding = const EdgeInsets.all(0),
      super.key});

  @override
  State<ShadowWidget> createState() => _ShadowWidgetState();
}

class _ShadowWidgetState extends State<ShadowWidget> {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: widget.margin,
      padding: widget.padding,
      decoration: BoxDecoration(
          // color: Colors.white,
          borderRadius: BorderRadius.circular(10),
          boxShadow: [
            BoxShadow(
                color: Colors.black.withOpacity(0.3),
                blurRadius: 8,
                offset:const Offset(3, 3))
          ]),
      child: widget.originWidget,
    );
  }
}
